//IR sensor handler
#ifndef IR_H
#define IR_H

typedef enum _IRSTATE
{
	IDLE = 0,
	WAITFORIR2 = 1, 
	WAITFORIR1 = 2,
	LOGTIME = 3,
	LOGTIMEEND = 4,
	ENDTEST_F = 5,
	ENDTEST_B = 6,
	PASSING = 7
}IRSTATE;

typedef enum _DIRECTION
{
	IR1TO2 = 0,
	IR2TO1 = 1,
	START = 2,
	FORWARD = IR1TO2,
	BACKWARD = IR2TO1
}DIRECTION;

void initIrSensors(int);
IRSTATE getIRState(void);
int checkIrSensors(byte* time);


#endif
